package com.esri.core.internal.a.b;

import com.esri.core.geometry.SpatialReference;
import com.esri.core.internal.tasks.f;
import com.tencent.smtt.sdk.TbsVideoCacheTask;
import java.util.HashMap;
import java.util.Map;

/* loaded from: classes.dex */
public class b extends f {
    private static final long serialVersionUID = 1;
    private String a;
    private String[] b;
    private SpatialReference c;

    public b(String str, String[] strArr, SpatialReference spatialReference) {
        this.a = null;
        this.b = null;
        this.a = str;
        this.b = strArr;
        this.c = spatialReference;
    }

    @Override // com.esri.core.internal.tasks.f
    public Map<String, String> generateRequestParams() throws Exception {
        HashMap hashMap = new HashMap();
        String str = this.a;
        if (str != null && str.length() > 0) {
            hashMap.put(TbsVideoCacheTask.KEY_VIDEO_CACHE_PARAM_URL, this.a);
        }
        String[] strArr = this.b;
        if (strArr != null && strArr.length > 0) {
            hashMap.put("folder", com.esri.core.internal.util.a.a(strArr, ","));
        }
        SpatialReference spatialReference = this.c;
        if (spatialReference != null) {
            if (spatialReference.getID() > -1) {
                hashMap.put("outSR", "{\"wkid\":" + this.c.getID() + "}");
            } else if (this.c.getText() != null) {
                hashMap.put("outSR", "{\"wkt\":" + this.c.getText() + "}");
            }
        }
        return hashMap;
    }

    @Override // com.esri.core.internal.tasks.f
    public boolean validate() {
        String str = this.a;
        return str != null && str.length() > 0;
    }
}
